/*
 * Перенос строк
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int
format(char *s, const int width)
{
	char *lastspace = strchr(s, ' ');
	char *cursym = s;
}

int
main(int argc, char **argv)
{
	int width;
	static char line[1000002];

	fgets(line, sizeof line, stdin);
	sscanf(line, "%d", &width);

	fgets(line, sizeof line, stdin);
	format(line, sizeof line, stdin);

	printf("%s", line);

	return 0;
}
